﻿namespace SLClient.CustomerControls
{
    using System;
    using System.Runtime.CompilerServices;

    public class BetPlayInfo
    {
        private string _stringFormat;

        public BetPlayInfo(int playid, string playname, short bettype, short isdouble, int betnumbercount, int offset, bool isZx)
        {
            this._stringFormat = "";
            this.ShowCount = 10;
            this.MinNumber = 0;
            this.MaxNumber = 9;
            this.BetNumberType = 0;
            this.PlayId = playid;
            this.PlayName = playname;
            this.BetType = bettype;
            this.IsDouble = isdouble;
            this.BetNumberCount = betnumbercount;
            this.BonusOffset = offset;
            this.IsZx = isZx;
        }

        public BetPlayInfo(int playid, string playname, int showcount, int minnumber, int maxnumber, short bettype, short isdouble, int betnumbercount, int offset, bool isZx)
        {
            this._stringFormat = "";
            this.BetNumberType = 1;
            this.PlayId = playid;
            this.PlayName = playname;
            this.ShowCount = showcount;
            this.MinNumber = minnumber;
            this.MaxNumber = maxnumber;
            this.BetType = bettype;
            this.IsDouble = isdouble;
            this.BetNumberCount = betnumbercount;
            this.BonusOffset = offset;
            this.IsZx = isZx;
        }

        public int BetNumberCount { get; set; }

        public short BetNumberType { get; set; }

        public short BetType { get; set; }

        public int BonusOffset { get; set; }

        public short IsDouble { get; set; }

        public bool IsZx { get; set; }

        public int MaxNumber { get; set; }

        public int MinNumber { get; set; }

        public int PlayId { get; set; }

        public string PlayName { get; set; }

        public int ShowCount { get; set; }

        public string StringFormat
        {
            get
            {
                if (this._stringFormat == string.Empty)
                {
                    this._stringFormat = (this.MaxNumber < 10) ? "" : "00";
                }
                return this._stringFormat;
            }
        }
    }
}

